# uvicorn main:app --reload --port 8800

from fastapi import FastAPI
from routes import predict_api

# 创建 FastAPI 实例，并确保文档路径未被禁用
app = FastAPI(
    title="AI Premium Predictor",
    description="API for predicting high premium stocks",
    version="1.0.0",
    docs_url="/docs",  # 默认文档路径
    redoc_url="/redoc"  # 默认 ReDoc 文档路径
)

# 挂载路由
app.include_router(predict_api.router)

# 仅在直接运行 main.py 时启动服务
if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8800, reload=True)